.TabsWithDropdown {
    position: relative;

    .TabsWithDropdown__Row {
        display: flex;
        align-items: stretch;
        gap: 8px;
    }

    .TabsWithDropdown__MoreButton {
        @include grapher_label-2-medium;
        flex: 0 0 auto; // Fixed size
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 8px 16px;
        background: $gray-10;
        color: $gray-80;
        white-space: nowrap;
        cursor: pointer;

        &[data-hovered] {
            background: $blue-20;
        }

        &[data-open] {
            background: $accent-pale-blue;
            color: $blue-90;
        }
    }
}

@at-root .TabsWithDropdown__Popover {
    border-radius: 4px;
    background-color: #fff;
    box-shadow: 0px 4px 40px 0px rgba(0, 0, 0, 0.06);
    max-width: 400px;
    max-height: 400px;
    overflow: hidden;

    .TabsWithDropdown__Menu {
        max-height: 400px;
        overflow-y: auto;
        padding: 4px 0;
        outline: none;
    }

    .TabsWithDropdown__MenuItem {
        @include grapher_label-2-regular;

        padding: 8px 16px;
        color: $gray-80;
        cursor: pointer;
        text-wrap: balance;

        &[data-hovered],
        &[data-focused] {
            background-color: $gray-10;
        }
    }
}
